home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / dccircut.zip / DC.DOC < prev    next >
Text File  |  1992-04-01  |  81KB  |  1,570 lines

  1.                             DC CIRCUIT ANALYSIS
  2.                           Version 1.1, March 1992
  3.                       Copyright 1991, Arthur Tanzella
  4.                             All Rights Reserved
  5.  
  6. The "DC Circuit Analysis" program is intended as an educational tool for
  7. introducing the user to the concepts of Direct Current (DC) circuits in
  8. general, and digital computer circuits in particular.  Circuits can be
  9. created and evaluated on the computer screen.  This program is not intended
  10. to be a design tool, and as such does not properly handle some analog
  11. circuits, such as operational amplifiers.  This documentation can function as
  12. a tutorial to learn about semiconductors, logic, and digital computer
  13. circuits.  Numerous sample circuits are used throughout this documentation
  14. and can be displayed and evaluated using this program.
  15.  
  16. ACKNOWLEDGEMENTS
  17.  
  18. I would like to take this opportunity to thank the following people who are
  19. my good friends, and have contributed significantly to this program.  Their
  20. contributions were in the testing of the program and in the form of their
  21. suggestions to make this program and this documentation easier to use and
  22. read.
  23.  
  24.                 Warren Cella
  25.                 Ken Hanawalt
  26.                 Art Silverstein 
  27.                 Mike Weisfield
  28.  
  29. LICENSE AGREEMENT
  30.  
  31. DC Circuit Analysis is a "Shareware Program" and is provided at no charge to
  32. the user for a one week evaluation period.  Feel free to share it with your
  33. friends, but please do not give it away altered or as part of another system. 
  34. The essence of "user-supported" software is to provide personal computer
  35. users with quality software without high prices, and yet to provide incentive
  36. for programmers to continue to develop new products.  If you find this
  37. program useful and continue to use the program after the one week evaluation
  38. period, you must make a registration payment of $15 to:
  39.  
  40.                 Arthur Tanzella
  41.                 4613 Clubvue Drive
  42.                 Pittsburgh, PA 15236-4803
  43.  
  44. Print out and fill in the "REGISTER.DOC" file.  Send it with the $15
  45. registration fee to the above address to register this program.
  46.  
  47. The $15 registration fee will license one copy for use on any one computer at
  48. any one time.  You must treat this software just like a book.  An example is
  49. that this software may be used by any number of people and may be freely
  50. moved from one computer location to another, so long as there is no
  51. possibility of it being used at one location while it's being used at
  52. another.  Treat the software just like a book that cannot be read by two
  53. people in two different locations at the same time.
  54.  
  55. Users of DC Circuit Analysis must accept this disclaimer of warranty: "DC
  56. Circuit Analysis is supplied as is.  The author disclaims all warranties,
  57. expressed or implied, including, without limitation, the warranties of
  58. merchantability and of fitness for any purpose. The author assumes no
  59. liability for damages, direct or consequential, which may result from the use
  60. of DC Circuit Analysis."
  61. Commercial users of DC Circuit Analysis must register and pay for their
  62. copies of DC Circuit Analysis within 30 days of first use or their license is
  63. withdrawn.  Site-License arrangements may be made by contacting Arthur
  64. Tanzella at the above address.
  65.  
  66. Anyone distributing DC Circuit Analysis for any kind of remuneration must
  67. first contact Arthur Tanzella at the address above for authorization. This
  68. authorization will be automatically granted to distributors recognized by the
  69. Association of Shareware Professionals (ASP) as adhering to its guidelines
  70. for shareware distributors, and such distributors may begin offering DC
  71. Circuit Analysis immediately.  However, Arthur Tanzella must still be advised
  72. so that the distributor can be kept up-to-date with the latest version of the
  73. DC Circuit Analysis program.
  74.  
  75. You are encouraged to pass a copy of DC Circuit Analysis along to your
  76. friends for evaluation.  Please encourage them to register their copy if they
  77. plan to continue using it.  All registered users will receive a copy of the
  78. latest version of the DC Circuit Analysis program.  If you have any comments
  79. or problems with this program, you can contact me at the address above. 
  80. Support will be provided to all registered users for a minimum of three
  81. months from the time they registered.
  82.  
  83. ASP OMBUDSMAN
  84.  
  85. This program is produced by a member of the Association of Shareware
  86. Professionals (ASP).  ASP wants to make sure that the shareware principle
  87. works for you.  If you are unable to resolve a shareware-related problem with
  88. an ASP member by contacting the member directly, ASP may be able to help. 
  89. The ASP Ombudsman can help you resolve a dispute or problem with an ASP
  90. member, but does not provide technical support for members' products.  Please
  91. write to the ASP Ombudsman at 545 Grover Road, Muskegon, MI 49442 or send a
  92. CompuServe message via CompuServe Mail to ASP Ombudsman 70007,3536.
  93.  
  94. GETTING STARTED
  95.  
  96. The DC Circuit Analysis program contains over 100 files occupying
  97. approximately 750 Kb of disk space, and is compressed into a single self-
  98. extracting file called "DCINSTAL.EXE."  This file was created using the LHarc
  99. version 2.11 program, which is a copyright reserved freeware program written
  100. by Haruyasu Yoshizaki.
  101.  
  102. To run the program requires an EGA or VGA graphics adapter with 256 Kb of RAM
  103. installed, and a color monitor.  It also requires between 275 Kb and 325 Kb
  104. of available RAM after DOS, drivers and Terminate and Stay Resident (TSR)
  105. program are loaded.  The actual amount of RAM required depends on the
  106. complexity of the circuit.  If Expanded Memory (EMS) is installed, only
  107. 275 Kb of RAM is required.  You can use the CHKDSK command to determine if
  108. you have enough available RAM to run this program.
  109.  
  110. To start the DC Circuit Analysis you must be in the directory containing this
  111. program.  Typically, the program is stored in the C:\DC directory.  Use the
  112. DOS "CD" (Change Directory) command to change the default directory to the
  113. program directory as follows:
  114.  
  115.                 CD \DC
  116.  
  117. To start the program type "DC"  with or without parameters as follows:
  118.  
  119.                 DC
  120.                    or
  121.                 DC filename.DC
  122.                    or
  123.                 DC filename.DC x
  124.  
  125. If no parameters are specified after the "DC" command, the program will
  126. display a menu containing the directory of sample circuits in alphabetical
  127. order.  The PGUP and PGDN key will page through this directory.  The UP and
  128. DOWN key will highlight sample circuits in the current page, and the ENTER
  129. key will select the highlighted sample circuit file.  F10 or ESC will exit
  130. this menu without selecting a sample circuit.  At the opening menu you can
  131. select "Exit without Saving" to exit the program without modifying the sample
  132. circuit.
  133.  
  134. If a filename is specified on the command line, and it does not exist, the
  135. program will display the "Modify Circuit" screen which allows you to create
  136. a new circuit.  By convention, circuit files have the extension "DC."  Press
  137. F10 or ESC to exit this screen.  When exiting from the opening menu you can
  138. choose to exit with or without saving the circuit.  If you choose to save the
  139. circuit, it will be stored in the file (filename.DC) specified on the command
  140. line when you started the program.  If a problem occurs during the writing of
  141. the file, the circuit will instead be written to the "DC.DC" file.  If the
  142. DOS environmental variable TMP is defined, the DC.DC file will be written to
  143. the directory identified by the TMP variable, otherwise it will be written to
  144. the default directory.
  145.  
  146. If the file specified on the command line already exist, the program will
  147. display the opening menu.  Your choices are:
  148.  
  149.                 Analyze Circuit
  150.                 Modify Circuit
  151.                 Select Sample Circuit
  152.                 Save and Continue
  153.                 Exit without Saving
  154.                 Save and Exit
  155.  
  156. "Analyze Circuit" will evaluate the circuit, calculating, and displaying
  157. voltages at interconnect nodes.  It will also calculate and display the
  158. current and its direction across each resistor in the circuit.  Finally, it
  159. will determine if any components are overloaded.
  160.  
  161. If you want to analyze a circuit and exit without modifying the file, add any
  162. character following the filename on the command line as follows:
  163.  
  164.                 DC filename.DC x
  165.  
  166. Sample circuit files are located in the "DC" sub-directory under the default
  167. directory.  You must prefix sample filenames with "DC\" to access files in
  168. this sub-directory as follows:
  169.  
  170.                 DC DC\filename.DC x
  171.  
  172. As an example, let's look at the "RESIST1.DC" sample circuit.  Type the
  173. following:
  174.  
  175.                 DC DC\RESIST1.DC R
  176. Or you can enter the program without specifying a filename, and select
  177. "RESIST1.DC" from the select sample circuit menu.  Next select "Analyze
  178. Circuit" from the opening menu.
  179.  
  180. This file actually contains three separate resistor circuits.  The simplest
  181. circuit is on the left, and the circuits gradually become more complex as you
  182. move to the right.  Notice that voltages at interconnect nodes are displayed
  183. in green, and currents across resistors are displayed in orange.  Further
  184. notice, that an arrow prefixes the current indicating the direction of the
  185. current, always pointing from a larger voltage to a smaller voltage.  The ESC
  186. or F10 key is used to exit.
  187.  
  188. BASIC ELECTRICAL THEORY
  189.  
  190. Electrical potential is measured in Volts (V).  Electrical current is
  191. measured in Amperes or Amps (A).  Electrical resistance is measured in
  192. Ohms (Ω).  Electrical power is measured in Watts (W).
  193.  
  194. Conductors are usually metal wires made of copper or aluminum, and are used
  195. to conduct electricity.  These metals have a very small resistance measured
  196. in milliohms (0.001 ohms) per foot of wire, depending on the diameter of the
  197. wire.  The DC Circuit Analysis program assumes that wires used to connect
  198. components have zero resistance.  This assumption is valid if short distances
  199. (less than a few feet) are involved.
  200.  
  201. Insulators are usually made of materials like rubber and plastic, and are
  202. used to insulate wires.  Insulators have very high resistances (millions of
  203. ohms).
  204.  
  205. Resistors are components that allow electrical current to flow, but resist
  206. the current converting some of it into heat.  Resistors are typically made
  207. from carbon, and have resistances measured in ohms or Killohms (1000 ohms).
  208.  
  209. A potentiometer is a variable resistor with three connection points.  The top
  210. and bottom connections are to a fixed resistor.  The middle connection can
  211. make contact at different locations along this resistor.  Hence, the sum of
  212. the resistance between the middle connection and the top connection, and the
  213. resistance between the middle connection and the bottom connection, is the
  214. same as the resistance between the top and the bottom connection.
  215.  
  216. Other basic electrical components include capacitors and inductors. 
  217. Capacitors are constructed of two large surface area conductors separated by
  218. a thin insulator.  Capacitors are typically used in an Alternating Current
  219. (AC) circuit to filter selective frequencies.  They can also be used to
  220. stabilize a DC voltage from voltage spikes. 
  221.  
  222. Inductors are wires wrapped into a coil.  When electrical current spirals
  223. through an inductor it creates a magnetic field.  Inductors are primarily
  224. used in AC circuits to produce oscillators.  Inductors have the opposite
  225. effect of capacitors on a circuit.  Inductors can also be used to create
  226. electromagnets.  If two inductors are wrapped around the same iron core, they
  227. form a transformer.  Transformers are used to raise or lower AC voltages.
  228.  
  229. It is possible to create an electrical potential by passing an inductor
  230. through a magnetic field.  This is how an electrical generator works.  
  231.  
  232. Batteries are electrical devices that use chemicals to produce an electrical
  233. potential.  The battery has an excess of electrons (negatively charged) at
  234. its negative pole, and a shortage of electrons at its positive pole.
  235.  
  236. Both generators and batteries can be used to supply power to an electrical
  237. circuit.  This program represents the power supply using fixed voltage nodes
  238. established at +10V, +5V, 0V (ground), -5V, or -10V.
  239.  
  240. In a steady state DC circuit, capacitors act like an insulator, unless the DC
  241. voltage is in excess of the capacitor rated voltage.  Inductors on the other
  242. hand, act like wires or resistors with small resistance values.
  243.  
  244. This program assumes a steady state DC circuit and uses the following
  245. equation to calculate voltage and current through out the circuit:
  246.  
  247.                 V = I R
  248.  
  249. where:
  250.         V is the potential measured in Volts
  251.         I is the current measured in Amps
  252.         R is the resistance measured in Ohms
  253.  
  254. Every component in the circuit is reduced to its characteristic resistance,
  255. and the voltage potential across the component is calculated based on the
  256. current flow using this equation.
  257.  
  258. The actual equation implemented in DC Circuit Analysis is a derivation of
  259. V=IR for multiple resistors connected to the same node.  The assumption is
  260. that the total current entering a node is equal to the total current exiting
  261. that node (ΣI=0).   The following equation is used to calculate the voltage
  262. at each node:
  263.  
  264.                       N
  265.                       Σ Vi/Ri 
  266.                      i=0
  267.                 V = ──────────
  268.                       N
  269.                       Σ 1/Ri
  270.                      i=0
  271.  
  272. where:
  273.         V  is the calculated voltage at a specified node
  274.         N  is the number of resistors connected to that node
  275.         Ri is the resistance of each resistor
  276.         Vi is the voltage at the node on the other end of each resistor
  277.  
  278. The calculation is continually repeated for each node in the circuit until
  279. the voltage at each node converges (barely changes).  The convergence
  280. criteria used by the program is a function of the speed of the computer.  The
  281. convergence criteria ranges from a stringent value of 0.00001 Volts for fast
  282. computers, to a relaxed value of 0.01 Volts for slow computers.  The more
  283. stringent the convergence criteria the longer the program takes to calculate
  284. voltage and current, and the more accurate the results are.  You can override
  285. the convergence value and explicitly set it external to the program using the
  286. DOS environmental variable "DC_DV" as follows:
  287.  
  288.                 SET DC_DV=0.01
  289.  
  290. Electrical power is calculated using the following equation:
  291.  
  292.                 P = V I
  293.                   or
  294.                 P = I² R
  295.  
  296. where:
  297.         P  is the calculated power in Watts
  298.         V  is the potential across a component measured in Volts
  299.         I  is the current passing through the component measured in Amps
  300.         I² is the current squared (current multiplied by itself) in Amps²
  301.         R  is the resistance of the component measured in Ohms
  302.  
  303. Power is calculated to determine if various components are overloaded.  All
  304. resistors in the library are assumed to be standard ¼ Watt resistors.  As an
  305. example, using the equation I = V/R, an 100 ohm resistor connected to a
  306. 10 Volt source and ground has a current of 0.1 Amps passing through it. 
  307. Using the power equation P = VI, the power through this resistor is 1 Watt
  308. which exceeds its rated value of a ¼ Watt.  Hence, this component (resistor)
  309. is overloaded.
  310.  
  311. USING THE PROGRAM
  312.  
  313. The DC Circuit Analysis program will automatically detect and uses the
  314. following: a math coprocessor, a two or three button mouse, and EMS
  315. (Expanded) memory.  These items are not required, but if found, will improve
  316. the performance of the program.
  317.  
  318. DC Circuit Analysis supports a mouse if one is installed with either the
  319. MOUSE.SYS or MOUSE.COM driver.  However, a mouse is not required.  In
  320. general, the left mouse button is equivalent to the ENTER key and is used to
  321. select items.  The right mouse button is equivalent to the ESC key and is
  322. used to exit screens.  If the mouse has three buttons, the middle button is
  323. supported in the Select Sample Circuit screen to page through the directory,
  324. in the Modify Circuit screen to display the Library of Components screen, and
  325. to switch pages of library components.
  326.  
  327. Let us now analyze the "RESIST2.DC" sample circuit.  This file contains two
  328. sample circuits, one with a potentiometer, and the other with a switch.  When
  329. more than one adjustable component (Switch or Potentiometer) is in a circuit,
  330. the LEFT and RIGHT cursor keys are used to select an adjustable component. 
  331. Adjustable components with blue back grounds indicate they have been
  332. selected.  If a mouse is installed, it can be used to select an adjustable
  333. component.  The ENTER key or the left mouse button will toggle the selected
  334. switch, or increment the selected potentiometer in 10% increments.  
  335.  
  336. All switches are Single-Pole Double-Throw.  When a switch is selected, the
  337. HOME, PGUP, and UP cursor keys will position the switch in the up position. 
  338. The END, PGDN, and DOWN cursor keys will position the switch in the down
  339. position.   
  340.  
  341. When a potentiometer is selected, the UP and DOWN cursor keys will increment
  342. or decrement the potentiometer in 1% increments.  The PGUP and PGDN keys will
  343. increment or decrement the potentiometer in 10% increments.  The HOME key
  344. sets the potentiometer to 99%, and the END key sets it to 1%.
  345.  
  346. If a potentiometer in the circuit is selected, the "p" key will plot a graph
  347. of the first eight interconnect node voltages (labeled A through H in yellow)
  348. versus the potentiometer voltage.  The program will automatically calculate
  349. voltages at every node as it adjusts the potentiometer.  If you have a fast
  350. computer, the potentiometer will be adjusted in 1% increments from 1% to 99%. 
  351. Slower computers will use larger increments between 2% and 5%.  Since the
  352. program must continually calculate the circuit until it converges for each
  353. time the potentiometer is incremented, plots can take up to ten minutes,
  354. depending on the complexity of the circuit and the speed of the computer.  A
  355. math coprocessor can speed up the calculation, but is not required.  The DOS
  356. environmental variable "DC_PLOT" can be used to explicitly set the
  357. potentiometer increments external to the program as follows:
  358.  
  359.                 SET DC_PLOT=5
  360.  
  361. Once the program completes this calculation, the plot will be displayed on
  362. the screen.  Press any key to exit the plot and return to the analysis
  363. screen.  Subsequent "p" commands will instantly redisplay the plot without
  364. recalculation.  Hence, you can press "p" to toggle between the plot and the
  365. analysis screen.  You can also adjust the potentiometer on the analysis
  366. screen as you toggle between the two screens.
  367.  
  368. Interconnect nodes, that are connected to fixed voltage or switches, are
  369. treated as though they are fixed nodes with the corresponding voltage, hence
  370. the program does not explicitly display a voltage adjacent to these nodes. 
  371. Interconnect nodes that are connected to other interconnect nodes are
  372. combined for calculational purposes into a single interconnect node and the
  373. calculated voltage is displayed only at the node that was created first.
  374.  
  375. Finally, the "w" key writes the Analysis or Plot screen into a PC Paintbrush
  376. compatible file called DC.PCX.  If the DOS environmental variable TMP is
  377. defined, the DC.PCX file will be written to the directory identified by the
  378. TMP variable, otherwise it will be written to the default directory.
  379.  
  380. Now let's exit (ESC) this sample circuit and look at modifying a circuit. 
  381. Let's start by copying a sample circuit file into a new filename as follows:
  382.  
  383.                 COPY DC\RESIST1.DC DC\TEST1.DC
  384.                 DC DC\TEST1.DC
  385.  
  386. Select "Modify Circuit" from the opening menu.  Use the cursor keys or mouse
  387. to highlight "Modify Circuit," and the ENTER key or left mouse button to
  388. select it.
  389.  
  390. Now let's modify the first circuit on the left.  Let's change the 10V fixed
  391. voltage node to 5V fixed voltage node.  Use the cursor keys or the mouse to
  392. move the cursor over the 10V fixed voltage icon.  Hold the CTRL key and the
  393. BACKSPACE key down simultaneously to delete the 10V fixed voltage icon.  Now
  394. press F4, or the middle button on the mouse, to display the library of
  395. components.  If you have a slow disk drive, it may take a few seconds to
  396. display this screen, because it must read the library file containing the
  397. icons.  A 256 Kb disk cache, such as SMARTDRV.SYS (see your MS-DOS manual),
  398. would speed up the display of this screen.  Use the cursor keys or mouse to
  399. move the white box to the 5V fixed voltage icon.  Press ENTER or the left
  400. mouse button to select this icon.  The Modify Circuit screen will now
  401. reappear.  Use the cursor keys or mouse to move the icon to the same location
  402. that the 10V fixed voltage icon was in, and press ENTER or the left mouse
  403. button to lock it in place.  
  404.  
  405. Beware that if you attempt to locate the icon too close to an existing icon
  406. on the screen, you will get the message: "ERROR - Component Overlaps Another
  407. Component."  If this occurs, press any key to clear the message, move the
  408. icon to another location, and press ENTER or the left mouse button.  Icons
  409. must have some space between them.  They cannot be touching.  Think of each
  410. icon as having an invisible rectangular outline that encompass the icon.  
  411.  
  412. If you need to move an icon, locate the cursor on top of the icon and press
  413. the F3 key.  Then use the cursor keys or mouse to move the icon to a new
  414. location and press ENTER or the left mouse button to lock it in place.
  415.  
  416. We now must connect the 5V fixed voltage node to the top of the resistor. 
  417. Locate the cursor over the bottom circle (connection point) of the 5V fixed
  418. voltage node, and press ENTER or the left mouse button.  The icon will turn
  419. red.  Now locate the cursor over the top portion of the resistor and press
  420. ENTER or the left mouse button.  The program will draw a wire (line) between
  421. the two connection points.  You must always select a node (interconnect,
  422. fixed, or switch) before selecting a component (or IC) to make a connection. 
  423. You can use the same procedure to disconnect (remove) a wire.  You can
  424. connect two nodes together in any order.
  425.  
  426. You can press F1 for a brief help message.  For additional help, press F1 a
  427. second time to receive a full screen of help.  This screen identifies the
  428. different types of nodes and components in the library.
  429.  
  430. Finally, press F10 or ESC to return to the opening menu.  Select "Analyze
  431. Circuit" to see the results of your modification.
  432.  
  433. Now is a good time for you to attempt to build your first circuit from
  434. scratch.  Type the following:
  435.  
  436.                 DC DC\TEST2.DC
  437.  
  438. Now build a simple resistor circuit of your choosing.  Then proceed to
  439. analyze your circuit.
  440.  
  441. Lets look at the RESIST3.DC sample circuit for an example of a complex
  442. resistor network.
  443.  
  444. BASIC SEMICONDUCTOR THEORY
  445.  
  446. In addition to resistors, there are electrical components called
  447. semiconductors.  They get their name from the fact that sometimes they act as
  448. a conductor, a resistor, or an insulator depending on the circumstance. 
  449. Semiconductors are typically made of materials like silicon or germanium.
  450.  
  451. There are two types of semiconductor materials, Positive type (P-type)
  452. material, and Negative type (N-type) material.  Typically, a semiconductor
  453. starts with a chemical group IV element (with four outer electrons), such as
  454. silicon.   This material must be formed into a nearly perfect crystal.  A
  455. small quantity of a group III element (with three outer electrons), such as
  456. boron, is added to create P-type material.  This material is positive because
  457. there is a slight shortage of electrons.  (Electrons are negative, so their
  458. absence makes the material positive).  Adding a small quantity of a group V
  459. element (with five outer electrons), such as phosphorus, creates N-type
  460. material.  Other elements can also be used to form semiconductors.
  461.  
  462. The simplest semiconductor is formed by joining P-type material and N-type
  463. material to form a P-N junction.  This class of semiconductors includes
  464. diodes and rectifiers.  The P-N junction is characterized by the fact that
  465. electrons can flow (forward) from the N-type material to the P-type material
  466. easier that (in reverse) from the P-type material to the N-type material. 
  467. There is a minimum voltage required, called the threshold voltage, before
  468. electrons can flow from the N-type to the P-type material.   A typical
  469. threshold voltage for a diode is 0.6 Volts.   For electrons to flow in the
  470. opposite direction usually requires a much higher voltage, (50 Volts or
  471. larger).
  472.  
  473. In reality, electrons travel from a negative source, containing an excess of
  474. electrons, to a positive source, containing a shortage of electrons.  By
  475. convention, electrical current is assumed to flow in the opposite direction,
  476. from a positive source to a negative source.  This convention was established
  477. long before the discovery of the electron.  
  478.  
  479. The symbol for a diode looks like a triangle pointing to a vertical line, as
  480. crudely represented below.  Conventional electrical current flows in the
  481. direction that the triangle points.
  482.  
  483.                        │\ │
  484.                 (+) ───┤ >├─── (-)
  485.                        │/ │
  486.  
  487.                        Diode
  488.  
  489. Another characteristic of a diode, is once the threshold voltage is exceeded,
  490. the effective resistance of the diode will change in an attempt to maintain
  491. a constant voltage drop across the diode equivalent to the threshold voltage. 
  492. Eventually, the diode will overload and burn out if too much current passes
  493. through it.
  494.  
  495. The DIODE1.DC and DIODE2.DC circuits illustrate the characteristics of a
  496. diode.  When plotting DIODE2.DC, you may observe a slight overshoot of the
  497. input voltage when it reaches the diode threshold voltage.  This is a
  498. shortcoming of this program.  In reality, the input voltage will slightly
  499. undershoot and asymptotically approach the threshold voltage.
  500.  
  501. This brings us to the next class of semiconductors, called transistors.  The
  502. name Transistor is derived from "Transient Resistor."  There are two types of
  503. transistors, NPN and PNP, which are constructed of three semiconductor
  504. materials sandwiched together.  The middle layer is called the "Base", and
  505. the outer two layers are called the "Emitter," and "Collector."  The
  506. thicknesses of each layer are not equal.  The Collector is the thickest
  507. layer, and the Base is the thinnest layer.
  508.  
  509. This class of transistor is called a "bipolar" transistor, because current
  510. flows through the transistor using two different methods.  In N-type
  511. material, current flows as electrons move through the material.  In P-type
  512. material, current flows as "holes" move through the material.
  513.  
  514. The symbol for a bipolar transistor is a three prong icon as crudely
  515. represented below.  The prong with an arrow head is always the Emitter and it
  516. points in the direction the (conventional) current flows.  The Emitter in an
  517. NPN transistor points away from the Base, and the Emitter in a PNP transistor
  518. points toward the Base.
  519.  
  520.  
  521.                 │ / Collector                   │  / Emitter
  522.                 │/                              │ /
  523.         Base ───┤\                      Base ───┤└
  524.                 │ \                             │\
  525.                 │  ┘ Emitter                    │ \ Collector
  526.  
  527.                NPN                             PNP
  528.  
  529. I will only discuss the NPN transistor.  The PNP transistor works
  530. identically, except that the direction of the current is reversed.  The Base-
  531. Emitter junction acts like a diode, but with a slightly higher threshold
  532. voltage of approximately 0.7 Volts.  When the Base-Emitter junction is
  533. reversed biased (the Emitter voltage is larger than the Base voltage), the
  534. transistor is considered to be "Off," and very little current can flow
  535. through the transistor.  When the Base-Emitter junction is forward biased
  536. (the Base voltage is larger than the Emitter voltage), the resistance between
  537. the Collector and Emitter is a function of the current flowing between the
  538. Base and Emitter.  The more current through the Base-Emitter junction, the
  539. smaller the resistance, and hence the larger the current flowing between the
  540. Collector and Emitter.  The ratio of current flowing between the Collector
  541. and Emitter, and the current flowing between the Base and Emitter, is called
  542. the current gain designated "Hfe," and is typically of the order of 100. 
  543. Hence, bipolar transistors are current amplifiers.  The difference between
  544. the different bipolar transistors is primarily the amount of current they can
  545. handle before overloading.  Computer circuits are designed to be fast, not
  546. powerful.
  547.  
  548. The TRANNPN.DC and TRANPNP.DC sample circuits illustrate the characteristics
  549. of bipolar transistors.
  550.  
  551. A special type of transistor designed for high power and high gain (Hfe) is
  552. called a darlington.  It is essentially two bipolar transistors back to back
  553. on the same piece of silicon.  It is characterized by a threshold voltage
  554. that is typically twice that of a bipolar transistor and has a current gain
  555. (Hfe) of the order of a 1000 instead of a 100.  The TRANDNPN.DC and
  556. TRANDPNP.DC sample circuits illustrate the characteristics of darlingtons.
  557.  
  558. A typical transistor in a computer circuit can only handle about 10 milliamps
  559. (mA) of current.  A typical medium range transistor, like the 2N2222, can
  560. handle up to ½ Amp.  A typical power darlington, like the TIP100, can handle
  561. up to 8 Amps.
  562.  
  563. The last type of transistor to discuss is called the Metal Oxide
  564. Semiconductor (MOS).  It is a type of Field Effect Transistor (FET).  This
  565. transistor is similar to a bipolar transistor (NPN or PNP) with the addition
  566. of a metal Gate over the Base.  The Gate is separated from the Base by a thin
  567. insulator, usually SiO2 (glass).  The symbols for these types of transistors
  568. are crudely represented below:
  569.  
  570.         Gate ──┐├─── Source                    │├─── Drain
  571.                │ ──> Base                      │ <── Base
  572.                │├─── Drain              Gate ──┘├─── Source
  573.   
  574.               PMOS                            NMOS
  575.  
  576. When a positive voltage of at least 2 Volts is applied between the Gate and
  577. a P-type Base, the electrons in the Base are pulled toward the Gate allowing
  578. current to flow between the two N-type material called the "Source" and the
  579. "Drain."  This is called an N-channel MOS (NMOS) transistor.  The larger the
  580. voltage, the less resistance between the Source and the Drain.  The
  581. resistance is inversely proportional to the voltage (less the 2 Volt
  582. threshold voltage) squared as illustrated in the following equation:
  583.  
  584.                       K
  585.                 R = ──────
  586.                     (V-2)²
  587.  
  588. where:  R = The calculated resistance between the Source and the Drain
  589.         K = A constant, approximately 5000 Ohms/Volt²
  590.         V = Voltage potential between the Gate and the Base.
  591.  
  592. A similar P-channel MOS (PMOS) transistor exists, but requires a negative
  593. voltage between the Gate and the N-type Base for current to flow between the
  594. P-type Source and Drain.  The TRANPMOS.DC and TRANNMOS.DC sample circuits
  595. illustrate the characteristics of MOS type transistors.
  596.  
  597. LOGIC
  598.  
  599. Before we can discuss actual computer circuits, we must first discuss the
  600. concept of logic.  There are only two logical values: "TRUE" and "FALSE." 
  601. There are three fundamental logical operators from which all other logical
  602. operators can be derived.  They are "NOT," "AND," and "OR."   The NOT
  603. operator works as follows:  If it is NOT TRUE, it must be FALSE.  Conversely,
  604. if it is NOT FALSE, it must be TRUE.  
  605.  
  606. All of the inputs must be TRUE for the AND operator to be TRUE.  Any of the
  607. inputs can be TRUE for the OR operator to be TRUE.  The following table
  608. summarize these fundamental logical operators:
  609.  
  610.  
  611.                ╔═══════════════╦═══════════════════════════╗
  612.                ║     Input     ║          Output           ║
  613.                ╟───────┬───────╫────────┬─────────┬────────╢
  614.                ║   A   │   B   ║ NOT A  │ A AND B │ A OR B ║
  615.                ╠═══════╪═══════╬════════╪═════════╪════════╣
  616.                ║ FALSE │ FALSE ║ TRUE   │  FALSE  │  FALSE ║
  617.                ║ FALSE │ TRUE  ║ TRUE   │  FALSE  │  TRUE  ║
  618.                ║ TRUE  │ FALSE ║ FALSE  │  FALSE  │  TRUE  ║
  619.                ║ TRUE  │ TRUE  ║ FALSE  │  TRUE   │  TRUE  ║
  620.                ╚═══════╧═══════╩════════╧═════════╧════════╝
  621.  
  622. In addition to the fundamental logical operators, there are three additional
  623. logical operators that are commonly used and can be derived from the three
  624. fundamental operators.  They are "NAND," "NOR," and Exclusive OR "XOR."  The
  625. NAND operators is the same as "NOT AND."  In other words, the result of the
  626. AND operator is complemented by the NOT operator.   The logical equations for
  627. the NAND operator is the following:
  628.  
  629.                 A NAND B = NOT (A AND B)
  630.  
  631. Similarly, the NOR operator is the same as "NOT OR."  The logical equation
  632. for the NOR operator is the following:
  633.  
  634.                 A NOR B = NOT (A OR B)
  635. The Exclusive OR is similar to the OR operator, except only one input is
  636. allowed to be TRUE at a time for the answer to be TRUE.  In other words, the
  637. answer is TRUE if one or the other input is TRUE, but not both.  The logical
  638. equation for Exclusive OR (XOR) is the following:
  639.  
  640.                 A XOR B = (A OR B) AND NOT (A AND B)
  641.                                 or
  642.                 A XOR B = (A OR B) AND (A NAND B)
  643.  
  644. The following table summarizes the NAND, NOR, and XOR logical operators:
  645.  
  646.              ╔═══════════════╦═══════════════════════════════╗
  647.              ║     Input     ║             Output            ║
  648.              ╟───────┬───────╫───────────┬─────────┬─────────╢
  649.              ║   A   │   B   ║ A NAND B  │ A NOR B │ A XOR B ║
  650.              ╠═══════╪═══════╬═══════════╪═════════╪═════════╣
  651.              ║ FALSE │ FALSE ║   TRUE    │  TRUE   │  FALSE  ║
  652.              ║ FALSE │ TRUE  ║   TRUE    │  FALSE  │  TRUE   ║
  653.              ║ TRUE  │ FALSE ║   TRUE    │  FALSE  │  TRUE   ║
  654.              ║ TRUE  │ TRUE  ║   FALSE   │  FALSE  │  FALSE  ║
  655.              ╚═══════╧═══════╩═══════════╧═════════╧═════════╝
  656.  
  657. I will now discuss the DeMorgan's theorem.  This theorem states that if you
  658. invert the input and output of the AND operator, you obtain the same results
  659. as the OR operator.  Conversely, if you invert the input and output of the OR
  660. operator, you obtain the same results as the AND operator.  In addition,
  661. there are corollaries to this theorem.  The logical equations for this
  662. theorem and its corollaries are listed below:
  663.  
  664.                  A AND B = NOT ( (NOT A) OR (NOT B) )
  665.                  A AND B = (NOT A) NOR (NOT B)
  666.                   A OR B = NOT ( (NOT A) AND (NOT B) )
  667.                   A OR B = (NOT A) NAND (NOT B)
  668.                 A NAND B = (NOT A) OR (NOT B)
  669.                  A NOR B = (NOT A) AND (NOT B)
  670.  
  671. The DeMorgan's theorem can be extremely useful when designing logic circuits.
  672.  
  673. It is actually possible to derive the three fundamental logical operators,
  674. NOT, AND, and OR using a single logical operator, and subsequently derive all
  675. logical operators from this single logical operator.  (The original computer
  676. designers only had one or two logical operator circuits to work with).  This
  677. logical operator can be either a NAND or a NOR logical operator.  
  678.  
  679. The following logical equations illustrate this capability:
  680.  
  681.                    NOT A = A NAND A
  682.                  A AND B = NOT (A NAND B)
  683.                   A OR B = (NOT A) NAND (NOT B)
  684.                  A NOR B = NOT ( (NOT A) NAND (NOT B) )
  685.                  A XOR B = NOT ( ( (NOT A) NAND (NOT B) NAND (A NAND B) )
  686.  
  687.                    NOT A = A NOR A
  688.                  A AND B = (NOT A) NOR (NOT B)
  689.                   A OR B = NOT (A NOR B)
  690.                 A NAND B = NOT ( (NOT A) NAND (NOT B) )
  691.                  A XOR B = (A NOR B) NOR ( (NOT A) NOR (NOT B) )
  692.  
  693. How does this discussion on logic help explain how digital computers work? 
  694. A digital computer is a "Binary" computer.  Binary computers deal with only
  695. two states: TRUE or FALSE, 1 or 0, On or Off, Voltage or Ground.  Binary
  696. computers do not use varying voltages to represent values, instead they uses
  697. simple On/Off circuits.  This means that binary computer circuits do not
  698. require precision electrical components.
  699.  
  700. The decimal numbering system we are familiar with uses ten different digits
  701. (0 through 9), and is referred to as base 10.  A binary computer represents
  702. numbers using base 2, which only has two digits "0" and "1."  In base 10, the
  703. least significant (right most) digit is multiplied by 1, the next digit by
  704. 10, 100, 1000, etc.  In base 2, the least significant digit is multiplied by
  705. 1, the next 2, 4, 8, etc.  So the decimal number 9 can be represented by the
  706. binary number 1001.  (A binary digit is called a bit.)
  707.  
  708. The Exclusive OR logical operator is the fundamental basis for a binary
  709. adder.  Once you have the ability to add two numbers together, you can than
  710. subtract two numbers by converting one number to its negative value and
  711. adding it to the other number.  Negative numbers are represented by using a
  712. method called "Twos Compliment."  This method represents a negative one by
  713. the largest possible number (all binary ones).  Hence when you add positive
  714. one and negative one you get zero (and carry out).  To convert a number to
  715. its negative value you must invert each digit using the NOT logical operator,
  716. and add one via carry in.  You can multiply two numbers by using a series of
  717. shifts and additions similar to long hand multiplication.  Finally you can
  718. divide two numbers by using a series of shifts and subtractions.
  719.  
  720. LOGIC GATES
  721.  
  722. We finally get to the good stuff.  It is time to start building circuits that
  723. can perform the various logical operations discussed above.  Circuits that
  724. perform logical operations are usually referred to as "Logic Gates."  We will
  725. start with the simplest circuit using diodes.  
  726.  
  727. Using only diodes and resistors we can build the AND and OR logic gates.  The
  728. sample circuits DIODEAND.DC and DIODEOR.DC illustrate these logic gates.  In
  729. these circuits the switches are the inputs, where 5 Volts represents a TRUE
  730. value, and ground (0 Volts) represents a FALSE value.  
  731.  
  732. The DIODEAO.DC depicts a circuit with two ANDs and one OR logical operator
  733. that solve the following equation:
  734.  
  735.                 E = (A AND B) OR (C AND D)
  736.  
  737.                 where E is the output
  738.  
  739. This sample circuit illustrates some of the limitations to pure diode logic
  740. gates.  The first limitation is that the output voltage is not regenerated
  741. (reset to 0 or 5 Volts) after each logic gate, hence the TRUE output of the
  742. AND gate can be as little as 2.8 Volts, instead of 5 Volts as illustrated in
  743. the previous example.  The reduced voltage is due to the Resistor-Diode-
  744. Resistor circuit between the input diodes and the output stage.  To make
  745. matters worse, the TRUE output of the OR gate can be as little as 2.2 Volts. 
  746. The second limitation is that diode circuits cannot function as a logical NOT
  747. operator.
  748.  
  749. If we look back to the sample circuit of the NPN transistor (TRANNPN.DC), we
  750. see that a single transistor can perform the function of the logical NOT
  751. operator.  When the input is 5 Volts the output is 0 Volts, and vice versa.
  752. DTL
  753.  
  754. By combining the Diode AND circuit for input and the Transistor NOT circuit
  755. for output, we form the Diode-Transistor Logic (DTL) NAND gate, as depicted
  756. in the sample circuit DTLNAND.DC.  It was necessary to add a diode between
  757. the Diode AND input and the transistor output because the threshold voltage
  758. of the transistor and the diode is almost the same.  This diode protects
  759. against false triggering of the transistor.  This circuit has the advantage
  760. that the output voltage of each gate is always regenerated, so there is no
  761. limit to how many gates can be connected in series. 
  762.  
  763. By removing one of the input diodes, the NAND gate now functions as a NOT
  764. gate (or Inverter).  The DTLNOT.DC sample circuit illustrates the NOT gate. 
  765. The PLTDTL.DC sample circuit allows you to vary the input voltage to see how
  766. this circuit responds.  If you use the "p" command, you can plot the voltage
  767. at each node as the input voltage varies from 0 Volts to 5 Volts.  When the
  768. input is approximately 0.6 Volts, the output of the logic gate will change.
  769.  
  770. The logic AND gate can be formed by combining the NAND gate with the NOT
  771. gate.  It is not necessary to use diodes in the internal NOT gate, when a
  772. single transistor will suffice.  The sample circuit DTLAND.DC illustrates
  773. this circuit.
  774.  
  775. The DTL OR gate does not use the Diode OR gate as an input stage.  If a Diode
  776. OR was used, current would be allowed to flow through the input stage into
  777. the remainder of the circuit.  The DTL NAND gate isolates the input current
  778. from the remainder of the circuit.  To provide the same isolation for the DTL
  779. OR gate, the OR gate is created using three NOT gates and an AND gate as
  780. defined by DeMorgan's theorem:
  781.  
  782.                 A OR B = NOT ( (NOT A) AND (NOT B) )
  783.  
  784. Two DTL NOT gates are used as an input stage, and the transistors' Collectors
  785. and Emitters are tied together to form an AND gate.  A third DTL NOT gate (a
  786. single transistor) is used for the output stage.  The final NOT gate is
  787. required to provide a consistent output voltage independent of whether one or
  788. both inputs are in the On position.  The sample circuit DTLOR.DC illustrates
  789. this circuit.
  790.  
  791. By adding another NOT gate to the output stage of the OR gate, we form the
  792. DTL NOR gate as illustrated in the DTLNOR.DC sample circuit.
  793.  
  794. Finally, the Exclusive OR (XOR) gate is illustrated in the DTLXOR.DC sample
  795. circuit, and uses the DTL AND, OR, and NAND gates to solve the Exclusive OR
  796. equation discussed earlier.  The traditional icons for the AND, OR, and NAND
  797. gates are used in this program.  If you press the F1 key, a full screen help
  798. message will appear identifying the icons used for logical gates.
  799.  
  800. TTL
  801.  
  802. This brings us to the next family of logic gates called Transistor-Transistor
  803. Logic (TTL).  The original TTL logic circuits used a multiple Emitter
  804. transistor for input, and a pair of transistors arranged one above the other
  805. for output.  The upper transistor is only On when the output is TRUE, and the
  806. lower transistor is only On when the output is FALSE.   This output
  807. configuration of transistors is referred to as the "Totem-Pole" output.  The
  808. multiple Emitter transistor, which could only be manufactured in an
  809. Integrated Circuit (IC) chip, performs the same basic function as the Diode
  810. AND gate used in the DTL NAND gate.  Today's TTL circuits actually use diodes
  811. for their input stage, just like the DTL circuits.  For this reason, the
  812. sample TTL circuits in this program use diodes for input, instead of the
  813. multiple Emitter transistor.  However, the rest of the TTL circuit is
  814. characteristic of the original TTL circuits.
  815.  
  816. The sample circuits TTLNOT.DC, TTLNAND.DC, and TTLAND.DC depict the TTL NOT,
  817. NAND and AND logic gates.  Notice that the TRUE output is not 5 Volts, but
  818. 3.7 Volts.  The PLTTTL.DC sample circuit is configured with a potentiometer
  819. for input and the voltage at each node can be plotted using the "p" option.
  820.  
  821. The sample circuits TTLOR.DC and TTLNOR.DC illustrate the TTL OR and NOR
  822. gates.  The input stage of these circuits are similar to the corresponding
  823. DTL input stages, and the output stage contains the standard TTL totem-pole
  824. output.
  825.  
  826. The Exclusive OR (XOR) gate is illustrated in the TTLXOR.DC sample circuit,
  827. and uses the TTL AND, OR, and NAND gates to solve the Exclusive OR equation
  828. discussed earlier.
  829.  
  830. In addition to the standard logic gates, TTL circuits offer a three state
  831. gate that can turn Off both transistors in the totem-pole output stage. 
  832. Three state gates are typically used when the output of many gates are
  833. connected to a bus, and only one gate is permitted to be active at a time. 
  834. The TTL3NOT.DC sample circuit is an example of a TTL three state gate.  The
  835. top switch is connected to the data input.  Only when the bottom switch is
  836. Off, will the output be enabled.
  837.  
  838. In general, TTL circuits are faster than DTL circuits.  Over the years
  839. several variations of TTL circuits have evolved.  These variations include
  840. Low-power (L), Schottky (S), Low-power Schottky (LS), and Advanced Low-power
  841. Schottky (ALS or F) circuits.  Of these variations, the LS series is the most
  842. commonly available since it is faster, cheaper, and requires less power than
  843. the original TTL circuits.
  844.  
  845. The Low-power Schottky (LS) series employs surface barrier diodes called
  846. "Schottky Diodes" between the Base and Collector junction of each transistor
  847. preventing the transistor from fully saturating (fully turned On).  By not
  848. fully saturating the transistor, it can switch from On to Off much faster. 
  849. These transistors are referred to as "Schottky Transistors" and are crudely
  850. depicted below:
  851.  
  852.                 ┌┐                              ┌┐
  853.                 │ / Collector                   │  / Emitter
  854.                 │/                              │ /
  855.         Base ───┤\                      Base ───┤└
  856.                 │ \                             │\
  857.                 │  ┘ Emitter                    │ \ Collector
  858.                └┘                              └┘
  859.  
  860.                NPN                             PNP
  861.  
  862. The SCHOTTKY.DC sample circuit illustrates the Schottky transistor and its
  863. equivalent circuit.  The input stage of the LS series gates use Schottky
  864. diodes instead of conventional diodes or multiple Emitter transistors.  In
  865. addition, the LS series uses Schottky diodes for negative input voltage
  866. protection.  The LSNOT.DC sample circuit depicts a typical LS series NOT
  867. gate.  (I apologize for the use of conventional diodes instead of Schottky
  868. diodes in this example).
  869.  
  870. ECL
  871.  
  872. The last family of logic gates that use bipolar transistors is called
  873. Emitter-Coupled Logic (ECL).  ECL gates maintain a partial current in each
  874. transistor preventing them from saturating or turning Off.  This makes ECL
  875. gates the fastest logic gates on the market.  Also, the difference in voltage
  876. between TRUE and FALSE, is approximately 1 Volt.  The typical ECL circuit
  877. consists of a differential amplifier input stage, a bias circuit, and an
  878. Emitter-follower output.  Traditional ECL circuits operate using ground and
  879. -5.2 Volts for power supply.  However, they can operate at 5 Volts and ground
  880. like other logic gates.  All the sample circuits in this program use the
  881. 5 Volts and ground power supply for ECL logic gates.
  882.  
  883. The basic ECL gate is an OR-NOR gate, which is characterized by a dual
  884. complementary output.  The ECLORNOR.DC sample circuit illustrates this logic
  885. gate.  You may notice that an input device labeled "ECL" is inserted between
  886. the switch and the circuit input.  This device consists of three resistors
  887. and is required to convert 5 Volts and ground from a switch to input voltages
  888. that are compatible with ECL circuits.  If this circuit was not installed,
  889. the ECL node voltages would not be characteristic of ECL circuits.  In
  890. addition to the switch-to-ECL input device, 47 Kilohms resistors are added to
  891. the output stage to provide a reference necessary to calculate the output
  892. voltage.
  893.  
  894. The ECLNOT.DC sample circuit illustrates the simplest of the ECL circuits,
  895. with a single input and the traditional dual complementary outputs.  The
  896. PLTECL.DC sample circuit, is the same NOT gate, but with a potentiometer for
  897. input to illustrate the effects of varying the input voltage, on the output
  898. voltage.
  899.  
  900. The ECL AND-NAND gate is derived using the OR-NOR gate as described by
  901. DeMorgan's theorem:
  902.  
  903.                  A AND B = (NOT A) NOR (NOT B)
  904.                 A NAND B = (NOT A) OR (NOT B)
  905.  
  906. The ECLNAND.DC sample circuit illustrates the ECL AND-NAND gate.  Both input
  907. stages start with a switch, followed by a switch-to-ECL converter, followed
  908. by an ECL NOT gate.  The outputs of the OR-NOR gate must be reversed, since
  909. the NOR output (top) becomes the AND output, and the OR output (bottom)
  910. becomes the NAND output.
  911.  
  912. The ECL Exclusive OR gate also has dual complementary outputs and is
  913. constructed using only NOT and OR-NOR gates.  You must reverse the OR-NOR
  914. gate outputs, since OR becomes NXOR, and NOR becomes XOR.  The sample circuit
  915. ECLXOR.DC illustrates this circuit which can also be represented by the
  916. logical equation:
  917.  
  918.                 A XOR B = (A NOR B) NOR ( (NOT A) OR (NOT B) )
  919.  
  920. ECL gates are the fastest logic gates on the market, but they also require
  921. the most power.  Hence, it is difficult to pack a lot of ECL gates on a
  922. single integrated circuit chip without overheating the chip.
  923.  
  924. CMOS
  925.  
  926. The last family of logic gates I will discuss are called Complementary Metal
  927. Oxide Semiconductors (CMOS).  The term complementary refers to the use of two
  928. types of transistors in the output circuit in a configuration similar to the
  929. totem-pole output in TTL.  The PMOS transistor is on top, and the NMOS
  930. transistor is on the bottom.  The CMOSNOT.DC sample circuit illustrates the
  931. NOT gate, which is the simplest of the CMOS gates.  The PLTCMOS.DC sample
  932. circuits illustrates the effects of varying input voltage on this gate.
  933.  
  934. The CMOS NAND gate consists of four transistors, two PMOS transistors in
  935. parallel, and two NMOS transistors in series, as illustrated by the
  936. CMOSNAND.DC sample circuit.  Both NMOS transistors must be On for the output
  937. to be FALSE (0 Volts).  The CMOS AND gate is the same circuit followed by a
  938. CMOS NOT gate as illustrated in the CMOSAND.DC sample circuit.
  939.  
  940. The CMOS NOR gate also consists of four transistors, however the two PMOS
  941. transistors are in series, and the two NMOS transistors are in parallel, as
  942. illustrated CMOSNOR.DC sample circuit.  Both PMOS transistors must be On for
  943. the output to be TRUE (5 Volts).  The CMOS OR gate is the same circuit
  944. followed by a CMOS NOT gate as illustrated in the CMOSOR.DC sample circuit.
  945.  
  946. The CMOS Exclusive OR gate is similar to the DTL and TTL Exclusive OR gates,
  947. except it uses CMOS AND, NAND, and OR gates as illustrated in the CMOSXOR.DC
  948. sample circuit.
  949.  
  950. CMOS circuits can operate using a wide variety of power supply voltages. 
  951. Since the threshold voltage for the PMOS and NMOS transistors is 2 Volts, the
  952. minimum power supply that CMOS circuits can use is 3 Volts.  On the other
  953. hand, the power supply can be as large as 15 Volts.  This makes battery
  954. driven circuits very practical, since the circuits will continue to operate
  955. as the battery gradually runs down.
  956.  
  957. CMOS gates are characterized by requiring very little power because the MOS
  958. transistors use voltage to trigger, instead of current.  The same reason that
  959. explains their low power consumption, also explains why CMOS gates are the
  960. slowest logic gates (when the transistors are physically the same size as the
  961. bipolar transistors in the previous logic families).  The speed of a circuit
  962. is limited by the size and spacing of the components, and the speed of light. 
  963. The speed of the electrons flowing through a circuit approaches the speed of
  964. light, which is the theoretical speed limit.  However, today's CMOS
  965. technology use very small transistors, with very thin insulators between the
  966. Gate and Base of the transistor, and the Gates are now made out of
  967. semiconductor material instead of aluminum metal.  Therefore today's CMOS
  968. logic gates can be fast.  Because of their low power consumption, they can be
  969. more densely packed on an integrated circuit chip.  As an example, the Intel
  970. 486 CPU is based on CMOS technology, contains more than a million transistors
  971. on a single chip, and can operate at speeds up to 50 MHz (million
  972. cycles/second).
  973.  
  974. INTEGRATED CIRCUITS (IC)
  975.  
  976. After the invention of semiconductors, the next major invention was the
  977. Integrated Circuit (IC) chip, which places multiple semiconductor components
  978. on a single semiconductor wafer.  An entire circuit constructed of resistors,
  979. capacitors, diodes, and transistors can be etched on to a single chip.  All
  980. the components are made from semiconductor P-type and N-type material, and
  981. are connected together with a metal conductor, like aluminum.  The resistor
  982. can be made of either P-type or N-type material.  By varying the thickness of
  983. this material and by winding it back and forth in a small area, different
  984. resistance values can be achieved.  Diodes are formed by the junction of
  985. P-type and N-type material.  Capacitors are typically reverse biased diodes,
  986. which are characterized by small reverse biased threshold voltages.  NPN
  987. bipolar transistors are constructed by embedding N-type material for both the
  988. Emitter and the Collector into a P-type Base.  (To make PNP transistors,
  989. replace N-type with P-type and vice versa).  CMOS transistors are similar to
  990. bipolar transistors, except there is a metal or semiconductor (P-type or N-
  991. type) Gate over the Base of the transistor separated by a thin insulator of
  992. SiO2 (glass).
  993.  
  994. The original ICs only contained a few components, possibly a single logic
  995. gate.  As the technology improved, the components became smaller, and more
  996. gates were placed on a single chip.  Eventually the ability to dissipate the
  997. heat became the limiting factor.  Using today's CMOS technology, over a
  998. million transistors can be placed on a single IC chip.
  999.  
  1000. In the DC Circuit Analysis program, the term "Integrated Circuit" (IC) takes
  1001. on a slightly different meaning.  The DC Circuit Analysis library contains
  1002. both basic components (like resistors, diodes, and transistors) and
  1003. Integrated Circuits (like DTL NOT, TTL NAND, and CMOS NOR gates), which are
  1004. circuits created using the DC Circuit Analysis program, saved in a file with
  1005. a "DCL" extension, and referenced in the library.  The DC.DCL file contains
  1006. all the parameters and screen locations for each item in the library.  (See
  1007. the section below that describes this file format).  Each IC is stored in a
  1008. separate file.  As an example, the DTL NOT gate is stored in the file
  1009. DTLNOT.DCL located in the DCL sub-directory.  You can view this circuit using
  1010. the following command:
  1011.  
  1012.                 DC DCL\DTLNOT.DCL R
  1013.  
  1014. You will notice that there is no power supply, no switches for input, and all
  1015. the nodes are set to 2.5 Volts (the default starting voltage for
  1016. calculational purposes).  The first nodes created correspond to the
  1017. connection points.  By convention, the connections are in the following
  1018. order: power supply, ground, inputs, and outputs.  DCL files are not always
  1019. easy to read, since they use the fewest number of nodes necessary for the
  1020. library.  Nodes can be moved around on the screen, but if you delete one of
  1021. the connection nodes, you cannot simply recreate it.  Since the order in
  1022. which the nodes were created is essential to maintain compatibility with the
  1023. DC.DCL file.  Please do not modify the DCL library files.
  1024.  
  1025. USER DEFINED ICs
  1026.  
  1027. Why did I discuss DCL files?  Because you can create your own circuits and
  1028. add them to the library.  The last eight icons in the library are reserved
  1029. for your use.  They are stored in the files DCL\U1.DCL through DCL\U8.DCL. 
  1030. The connection nodes are already created and organized on the screen in a
  1031. pattern matching the icon connection points.  All you have to do is add your
  1032. circuits to these files.  You can embed other ICs into your circuit, the only
  1033. limitation is the 100 total components which includes the components within
  1034. each IC and the IC icon itself.  You can move the nodes around the screen,
  1035. but please do not delete them.  If you make a mistake in your user defined IC
  1036. file, you can start all over by copying the DCL\USER.DCL file into the file
  1037. you were working on.  This file provides a good starting point.  Please do
  1038. not modify the DCL\USER.DCL file.
  1039.  
  1040. MISCELLANEOUS EXAMPLES
  1041.  
  1042. Let's look at some miscellaneous examples.  Since my primary intention of
  1043. writing this program was to introduce you to computer circuits, I will
  1044. discuss some common computer circuits.  Due to the limitation of 100
  1045. components and the computer overhead to analyze complex circuits, I can only
  1046. discuss a few simple circuits.  To reduce the time required to analyze these
  1047. circuits, only CMOS technology will be used for these sample circuits.
  1048.  
  1049. How does computer memory work?  The basis for all computer memory is the
  1050. Set-Reset (S-R) Latch, which consists of two NAND gates that are cross
  1051. connected.  The SRLATCH.DC sample circuit illustrates the S-R Latch.  This
  1052. circuits have two inputs and two outputs.  The output of the top NAND gate is
  1053. the normal output, and the output of the bottom NAND gate is the complemented
  1054. output.  The top switch Sets the latch to TRUE, when it is in the Off
  1055. position.  The bottom switch Resets the latch to FALSE, when it is in the Off
  1056. position.  When both switches are in the On position, the circuit "remembers"
  1057. what it was last set to.  However, both switches should not be in the Off
  1058. position, since both outputs (which are suppose to be opposites of each
  1059. other) will both become TRUE.
  1060.  
  1061. The Data Latch is an improvement on the Set-Reset Latch.  The DLATCH.DC
  1062. sample circuit illustrates the Data Latch.  This circuits consists of four
  1063. NAND gates, where the two NAND gates on the right form the familiar Set-Reset
  1064. Latch described above.  The top switch is the data input, and the bottom
  1065. switch is the enable input.  When the bottom switch is On, the input data is
  1066. stored in the latch.  When the bottom switch is Off, the input data is
  1067. ignored, and the circuit remembers its last setting.
  1068.  
  1069. The Data Flip-Flop is an example of a Master-Slave Flip-Flop.  It consists of
  1070. two latches connected in series and is illustrated in the FLIPFLOP.DC sample
  1071. circuit.  The first (Master) latch is a standard Data Latch as described
  1072. above.  The second (Slave) latch is a Set-Reset Latch with enable.  When the
  1073. enable input is On, the value of the Data input is stored in the first latch. 
  1074. When the enable input is Off, the value stored in the first latch is
  1075. transferred to the second latch.  Applications for Flip-Flops include binary
  1076. counters.
  1077.  
  1078. The next set of circuits I will discuss are adders.  I will start with the
  1079. Half-Adder.  This circuits adds two binary numbers together and has two
  1080. outputs: Sum and Carry.  The Half-Adder is a variation on the Exclusive OR
  1081. circuit.  The HALFADDR.DC sample circuit illustrates the Half-Adder, as
  1082. described by the following logical equations:
  1083.  
  1084.                   Sum = A XOR B
  1085.                 Carry = A AND B
  1086.  
  1087. The truth table for a Half-Adder is as follows:
  1088.  
  1089.                           ╔═══════╦════════════╗
  1090.                           ║ Input ║   Output   ║
  1091.                           ╟───┬───╫─────┬──────╢
  1092.                           ║ A │ B ║ Sum │ Carry║
  1093.                           ╠═══╪═══╬═════╪══════╣
  1094.                           ║ 0 │ 0 ║  0  │   0  ║
  1095.                           ║ 0 │ 1 ║  1  │   0  ║
  1096.                           ║ 1 │ 0 ║  1  │   0  ║
  1097.                           ║ 1 │ 1 ║  0  │   1  ║
  1098.                           ╚═══╧═══╩═════╧══════╝
  1099.  
  1100. The Full-Adder is essentially two Half-Adders in series.  The Full-Adder has
  1101. three inputs: A, B, and Carry (C) from the previous least significant digit. 
  1102. It also has two outputs: Sum and Carry.  Full-Adders can be connected in
  1103. series to handle larger numbers.  The FULLADDR.DC sample circuit illustrates
  1104. a Full-Adder, as described by the following logical equations:
  1105.  
  1106.                   Sum = (A XOR B) XOR C
  1107.                 Carry = (A AND B) OR (A AND C) OR (B AND C)
  1108.  
  1109. The truth table for a Full-Adder is as follows:
  1110.  
  1111.                         ╔═══════════╦════════════╗
  1112.                         ║   Input   ║   Output   ║
  1113.                         ╟───┬───┬───╫─────┬──────╢
  1114.                         ║ A │ B │ C ║ Sum │ Carry║
  1115.                         ╠═══╪═══╪═══╬═════╪══════╣
  1116.                         ║ 0 │ 0 │ 0 ║  0  │   0  ║
  1117.                         ║ 0 │ 0 │ 1 ║  1  │   0  ║
  1118.                         ║ 0 │ 1 │ 0 ║  1  │   0  ║
  1119.                         ║ 0 │ 1 │ 1 ║  0  │   1  ║
  1120.                         ║ 1 │ 0 │ 0 ║  1  │   0  ║
  1121.                         ║ 1 │ 0 │ 1 ║  0  │   1  ║
  1122.                         ║ 1 │ 1 │ 0 ║  0  │   1  ║
  1123.                         ║ 1 │ 1 │ 1 ║  1  │   1  ║
  1124.                         ╚═══╧═══╧═══╩═════╧══════╝
  1125.  
  1126. Due to limitations of this program, it is not practical to attempt to show
  1127. more complex logic circuits.  If you would like to learn more about computer
  1128. logic circuits, I recommend you invest in the "Logic Circuit Analysis"
  1129. program that I wrote.  It is cable of handling 1,000 logic gates, which is
  1130. enough to model an entire 4-bit Central Processing Unit (CPU).
  1131.  
  1132. Sometimes it is necessary to interface computer circuits to the outside
  1133. world.  The first circuit I will discuss is a Digital to Analog (D/A)
  1134. converter.  The simplest D/A consists of a resistor circuit.  The DTOA.DC
  1135. sample circuit is an example of a D/A.  The top switch is the most
  1136. significant digit and the bottom switch is the least significant digit.  If
  1137. you turn Off all the switches, and then turn only one switch On at a time,
  1138. you will notice that the top switch adds 2.5 Volts (½ the power supply
  1139. voltage), the second switch adds 1.25 Volts (¼ the power supply voltage), the
  1140. third switch 0.625 Volts, and the last switch 0.3125 Volts (or 1/16 the power
  1141. supply voltage).  This circuit can easily be interfaced with CMOS logic
  1142. gates, but not with the other family of logic gates.  That is because CMOS
  1143. logic is the only logic family with full 0 to 5 Volt output.
  1144.  
  1145. The next circuit is a CMOS Analog Switch.  The ANALOGSW.DC sample circuit
  1146. illustrates this circuit.  It uses a CMOS NOT circuit and a pair of MOS
  1147. transistors.  However, they are configured such that the switch can turn both
  1148. transistors On, or both Off.  When they are both On, they will provide a
  1149. small resistance allowing current to flow in either direction.  A typical use
  1150. of analog switches is to multiplex multiple analog signals into a single
  1151. Analog to Digital converter.
  1152.  
  1153. This brings us to Solid State Switches.  Sometimes it is necessary for a
  1154. digital circuit to control an electrical device, such as a light bulb, or a
  1155. motor.  The SSSW.DC and SSPOWSW.DC sample circuits illustrate solid state
  1156. switches capable of switching loads up to ½ Amp and 8 Amps respectively.  The
  1157. first circuit uses a 2N2222 transistor to switch up to a ½ Amp load, and the
  1158. second circuit adds a TIP100 power darlington to switch up to an 8 Amp load. 
  1159. The 100 ohm resistor represents the load in both cases.  Higher voltages can
  1160. be controlled, but the resistor values must be changed and you will have to
  1161. use larger Wattage resistors.  (All resistors in this library are only rated
  1162. at ¼ Watts).  
  1163.  
  1164. The final sample circuit, SSRPOWSW.DC is a Solid State Reversible Power
  1165. Switch which uses four power darlingtons (two NPN and two PNP) for its
  1166. output.  This circuit can turn the load On and Off, as well as reverse the
  1167. power applied to the load.  The right switch is the On/Off switch, and the
  1168. left switch is the Forward/Reverse switch.  In this circuit each TTL AND gate
  1169. controls one 2N2222 transistor, which in-turn controls two power darlingtons,
  1170. one NPN and the other PNP, each located in opposite corners of the output
  1171. stage.  The TTL logic assures that all four darlingtons are not turned On at
  1172. the same time, but can all be turned Off.  If you intend to use this circuit
  1173. with a motor, you will have to add additional rectifiers and capacitors to
  1174. protect the circuit from the side effects of the motor.
  1175.  
  1176. I hope you enjoyed this tutorial and will continue to use this program to
  1177. explore other Direct Current (DC) circuits.  This program allows you to try
  1178. some circuits without actually building the circuit.
  1179.  
  1180. SPECIFICATIONS
  1181.  
  1182.         REQUIREMENTS
  1183.         ────────────
  1184.         IBM-PC or compatible computer
  1185.         750 Kb of disk space
  1186.         275 Kb minimum available RAM, (after DOS, drivers and TSR)
  1187.         325 Kb maximum available RAM required for complex circuits and no EMS
  1188.         EGA or VGA graphics adapter with 256 Kb of RAM installed
  1189.         Color Monitor
  1190.  
  1191.         SUPPORTS (but not required)
  1192.         ───────────────────────────
  1193.         Mouse (2 or 3 button) with mouse.sys or mouse.com device driver.
  1194.         Math coprocessor.  If one is installed, the program will run faster.
  1195.         Expanded Memory (EMS).  If 64 Kb EMS is available, it will be used.
  1196.  
  1197.         DOS ENVIRONMENTAL VARIABLES
  1198.         ───────────────────────────
  1199.         TMP     Sets location of DC.PCX and DC.DC file, otherwise written to
  1200.                 the default directory.
  1201.                 Example: SET TMP=D:\
  1202.  
  1203.         MONITOR Can be set to EGA or VGA.  The program will automatically
  1204.                 detect if an EGA or VGA adapter is installed.  The MONITOR
  1205.                 variable will override the automatic detection.
  1206.                 Example: SET MONITOR=EGA
  1207.  
  1208.         EMS     Can be set to OFF or NO to override auto-detection so not to
  1209.                 use EMS memory even if it is available.
  1210.                 Example: SET EMS=OFF
  1211.  
  1212.         DC_DV   Used to override the convergence criteria.  If it takes a
  1213.                 long time to display calculation results, you may want to set
  1214.                 this variable to 0.01.  This will speed up the program but
  1215.                 reduce the accuracy of the results.  
  1216.                 Example: SET DC_DV=0.01
  1217.  
  1218.         DC_PLOT Used to override the potentiometer increments used during
  1219.                 plotting.  This value may range from 1% to 5%.
  1220.                 Example: SET DC_PLOT=5
  1221.  
  1222.  
  1223.         PROGRAM LIMITS
  1224.         ──────────────
  1225.         112 Library Entries
  1226.         100 Components per circuit, including ICs and their components
  1227.         250 Nodes per circuit
  1228.         750 Connections per circuit
  1229.           8 User Definable Circuits
  1230.           8 Connection terminals per IC
  1231.           5 Connections per node.
  1232.  
  1233. SUMMARY OF KEYS
  1234.  
  1235.         OPENING MENU
  1236.                 Cursor Keys - Highlight the desired item
  1237.                 HOME - Highlight "Analyze Circuit"
  1238.                 END - Highlight "Save and Exit"
  1239.                 ENTER - Select the highlighted item
  1240.  
  1241.         SELECT SAMPLE CIRCUIT MENU
  1242.                 PGUP, PGDN - Display additional pages of sample circuits
  1243.                 Cursor Keys - Highlight the desired sample circuit
  1244.                 HOME - Highlight the first sample circuit on this page
  1245.                 END - Highlight the last sample circuit on this page
  1246.                 ENTER - Select the highlighted sample circuit
  1247.                 ESC, F10 - Exit this menu without selecting a sample circuit
  1248.  
  1249.         ANALYZE CIRCUIT
  1250.                 LEFT and RIGHT - Highlight Adjustable Component
  1251.                                  (Switch or Potentiometer)
  1252.                 Switch:
  1253.                         UP, PGUP, HOME - Set to up position
  1254.                         DOWN, PGDN, END - Set to down position
  1255.                         ENTER - Toggle Switch
  1256.                 Potentiometer:
  1257.                         HOME - Set to 99%
  1258.                         ENTER, PGUP - Increment by 10%
  1259.                         UP - Increment by 1%
  1260.                         DOWN - Decrement by 1%
  1261.                         PGDN - Decrement by 10%
  1262.                         END - Set to 1%
  1263.                 p - Plot node voltage vs. potentiometer voltage
  1264.                 w - Save screen into PC Paintbrush compatible file
  1265.                 F10, ESC - Exit 
  1266.  
  1267.         MODIFY CIRCUIT
  1268.                 F1 - Help (Second F1 for full screen help)
  1269.                 F2 - Redraw screen
  1270.                 F3 - Move a Component (Node or IC)
  1271.                 F4 - Access Library of Components 
  1272.                 Cursor Keys - Move Cursor
  1273.                 CTRL-BACKSPACE - Delete Component (Node or IC)
  1274.                 ENTER - Make a Connection, or Lock Component in position
  1275.                 F10, ESC - Exit
  1276.  
  1277.         LIBRARY OF COMPONENTS
  1278.                 F1 - Help (Second F1 for full screen help)
  1279.                 Cursor Keys - Highlight Component (Node or IC)
  1280.                 PGUP, PGDN - Switch Pages of Library Components
  1281.                 ENTER - Select Component
  1282.                 F10, ESC - Exit
  1283.  
  1284. LIBRARY
  1285.  
  1286. The Library is based on the following components:
  1287. Resistors are standard values, ¼ Watts, 5% carbon resistors
  1288. Potentiometers are linear and are rated at 2 Watts
  1289. Diodes are 1N914 high speed switching Diodes (10 mA)
  1290. NPN Transistors are 2N2222 500 mA, with Hfe = 150
  1291. PNP Transistors are 2N2904 500 mA, with Hfe = 150
  1292. NPN Darlingtons are TIP100 8 Amp, with Hfe = 2000
  1293. PNP Darlingtons are TIP105 8 Amp, with Hfe = 3000
  1294. PMOS and NMOS transistors are standard CMOS transistors
  1295. ICs are circuits created using the DC Circuit Analysis program and made
  1296. available in the library.
  1297.  
  1298. The Library contains the following items:
  1299.  
  1300. Type                    Description
  1301. ─────   ───────────────────────────────────────────────
  1302. INODE   Interconnect Node
  1303. VNODE   Fixed Voltage Node,   0 Volts (Ground)
  1304. VNODE   Fixed Voltage Node,   5 Volts
  1305. VNODE   Fixed Voltage Node,  -5 Volts
  1306. VNODE   Fixed Voltage Node,  10 Volts
  1307. VNODE   Fixed Voltage Node, -10 Volts
  1308. SNODE   Switch Node,          5 Volts and   0 Volts (Ground)
  1309. SNODE   Switch Node,         10 Volts and -10 Volts
  1310.  
  1311. R       Resistor,           100 Ohms, ¼ Watts
  1312. R       Resistor,           130 Ohms, ¼ Watts
  1313. R       Resistor,           240 Ohms, ¼ Watts
  1314. R       Resistor,           470 Ohms, ¼ Watts
  1315. R       Resistor,           750 Ohms, ¼ Watts
  1316. R       Resistor,         1,000 Ohms, ¼ Watts
  1317. R       Resistor,         1,600 Ohms, ¼ Watts
  1318. R       Resistor,         2,000 Ohms, ¼ Watts
  1319.  
  1320. R       Resistor,         3,000 Ohms, ¼ Watts
  1321. R       Resistor,         3,900 Ohms, ¼ Watts
  1322. R       Resistor,         4,700 Ohms, ¼ Watts
  1323. R       Resistor,            10 Kilohms, ¼ Watts
  1324. R       Resistor,            20 Kilohms, ¼ Watts
  1325. R       Resistor,            47 Kilohms, ¼ Watts
  1326. R       Resistor,           100 Kilohms, ¼ Watts
  1327. R       Resistor,         1,000 Kilohms, ¼ Watts
  1328.  
  1329. R       Resistor,           100 Ohms, ¼ Watts
  1330. R       Resistor,           130 Ohms, ¼ Watts
  1331. R       Resistor,           240 Ohms, ¼ Watts
  1332. R       Resistor,           470 Ohms, ¼ Watts
  1333. R       Resistor,           750 Ohms, ¼ Watts
  1334. R       Resistor,         1,000 Ohms, ¼ Watts
  1335. R       Resistor,         1,600 Ohms, ¼ Watts
  1336. R       Resistor,         2,000 Ohms, ¼ Watts
  1337.  
  1338. R       Resistor,         3,000 Ohms, ¼ Watts
  1339. R       Resistor,         3,900 Ohms, ¼ Watts
  1340. R       Resistor,         4,700 Ohms, ¼ Watts
  1341. R       Resistor,            10 Kilohms, ¼ Watts
  1342. R       Resistor,            20 Kilohms, ¼ Watts
  1343. R       Resistor,            47 Kilohms, ¼ Watts
  1344. R       Resistor,           100 Kilohms, ¼ Watts
  1345. R       Resistor,         1,000 Kilohms, ¼ Watts
  1346.  
  1347. POT     Potentiometer,       1 Kilohms, 2 Watts
  1348. POT     Potentiometer,      10 Kilohms, 2 Watts
  1349. DIODE   Switching Diode,  1N914 10 milliamps
  1350. DIODE   Switching Diode,  1N914 10 milliamps
  1351. DIODE   Switching Diode,  1N914 10 milliamps
  1352. DIODE   Switching Diode,  1N914 10 milliamps
  1353. PMOS    PMOS Transistor,  (CMOS) 10 milliamps
  1354. NMOS    NMOS Transistor,  (CMOS) 10 milliamps
  1355.  
  1356. NPN     NPN Transistor,   2N2222 500 milliamps, Hfe=150
  1357. NPN     NPN Transistor,   2N2222 500 milliamps, Hfe=150
  1358. PNP     PNP Transistor,   2N2904 500 milliamps, Hfe=150
  1359. PNP     PNP Transistor,   2N2904 500 milliamps, Hfe=150
  1360. NPN     NPN Darlington,   TIP100 8 Amps, Hfe=2000
  1361. NPN     NPN Darlington,   TIP100 8 Amps, Hfe=2000
  1362. PNP     PNP Darlington,   TIP105 8 Amps, Hfe=3000
  1363. PNP     PNP Darlington,   TIP105 8 Amps, Hfe=3000
  1364.  
  1365. IC      Integrated Circuit,    DTLNOT.DCL,   DTL Inverter (NOT)
  1366. IC      Integrated Circuit,    TTLNOT.DCL,   TTL Inverter (NOT)
  1367. IC      Integrated Circuit,    CMOSNOT.DCL,  CMOS Inverter (NOT)
  1368. IC      Integrated Circuit,    ECLNOT.DCL,   ECL with Differential output
  1369. IC      Integrated Circuit,    ECL116.DCL,   ECL Differential input & output
  1370. IC      Integrated Circuit,    ECLOR.DCL,    ECL 2-In OR/NOR
  1371. IC      Integrated Circuit,    ECLOR3.DCL,   ECL 3-In OR/NOR
  1372. IC      Integrated Circuit,    ECLAND.DCL,   ECL 2-In AND/NAND  
  1373.  
  1374. IC      Integrated Circuit,    DTLAND.DCL,   DTL 2-In AND
  1375. IC      Integrated Circuit,    DTLAND3.DCL,  DTL 3-In AND
  1376. IC      Integrated Circuit,    DTLOR.DCL,    DTL 2-In OR
  1377. IC      Integrated Circuit,    DTLOR3.DCL,   DTL 3-In OR
  1378. IC      Integrated Circuit,    DTLNAND.DCL,  DTL 2-In NAND
  1379. IC      Integrated Circuit,    DTLNAND3.DCL, DTL 3-In NAND
  1380. IC      Integrated Circuit,    DTLNOR.DCL,   DTL 2-In NOR
  1381. IC      Integrated Circuit,    DTLNOR3.DCL,  DTL 3-In NOR
  1382.  
  1383. IC      Integrated Circuit,    TTLAND.DCL,   TTL 2-In AND
  1384. IC      Integrated Circuit,    TTLAND3.DCL,  TTL 3-In AND
  1385. IC      Integrated Circuit,    TTLOR.DCL,    TTL 2-In OR
  1386. IC      Integrated Circuit,    TTLOR3.DCL,   TTL 3-In OR
  1387. IC      Integrated Circuit,    TTLNAND.DCL,  TTL 2-In NAND
  1388. IC      Integrated Circuit,    TTLNAND3.DCL, TTL 3-In NAND
  1389. IC      Integrated Circuit,    TTLNOR.DCL,   TTL 2-In OR
  1390. IC      Integrated Circuit,    TTLNOR3.DCL,  TTL 3-In NOR
  1391.  
  1392. IC      Integrated Circuit,    CMOSAND.DCL,  CMOS 2-In AND
  1393. IC      Integrated Circuit,    CMOSAND3.DCL, CMOS 3-In AND
  1394. IC      Integrated Circuit,    CMOSOR.DCL,   CMOS 2-In OR
  1395. IC      Integrated Circuit,    CMOSOR3.DCL,  CMOS 3-In OR
  1396. IC      Integrated Circuit,    CMOSNAND.DCL, CMOS 2-In NAND
  1397. IC      Integrated Circuit,    CMOSNND3.DCL, CMOS 3-In NAND
  1398. IC      Integrated Circuit,    CMOSNOR.DCL,  CMOS 2-In NOR
  1399. IC      Integrated Circuit,    CMOSNOR3.DCL, CMOS 3-In NOR
  1400.  
  1401. IC      Integrated Circuit,    DTLXOR.DCL,   DTL Exclusive OR
  1402. IC      Integrated Circuit,    TTLXOR.DCL.   TTL Exclusive OR
  1403. IC      Integrated Circuit,    CMOSXOR.DCL,  CMOS Exclusive OR
  1404. IC      Integrated Circuit,    ECLXOR.DCL,   ECL Exclusive OR/NOR
  1405. IC      Integrated Circuit,    ECLIN.DCL,    Switch to ECL Input
  1406. IC      Integrated Circuit,    DTOA.DCL,     Digital to Analog Converter
  1407. IC      Integrated Circuit,    SCHOTTKY.DCL, NPN Schottky Transistor
  1408. IC      Integrated Circuit,    SCHOTTKR.DCL, NPN Schottky Transistor
  1409.  
  1410. IC      Integrated Circuit,    User.DCL,     Reserved
  1411. IC      Integrated Circuit,    User.DCL,     Reserved
  1412. IC      Integrated Circuit,    User.DCL,     Reserved
  1413. IC      Integrated Circuit,    User.DCL,     Reserved
  1414. IC      Integrated Circuit,    User.DCL,     Reserved
  1415. IC      Integrated Circuit,    User.DCL,     Reserved
  1416. IC      Integrated Circuit,    User.DCL,     Reserved
  1417. IC      Integrated Circuit,    User.DCL,     Reserved
  1418.  
  1419. IC      Integrated Circuit,    U1.DCL,       User Defined IC
  1420. IC      Integrated Circuit,    U2.DCL,       User Defined IC
  1421. IC      Integrated Circuit,    U3.DCL,       User Defined IC
  1422. IC      Integrated Circuit,    U4.DCL,       User Defined IC
  1423. IC      Integrated Circuit,    U5.DCL,       User Defined IC
  1424. IC      Integrated Circuit,    U6.DCL,       User Defined IC
  1425. IC      Integrated Circuit,    U7.DCL,       User Defined IC
  1426. IC      Integrated Circuit,    U8.DCL,       User Defined IC
  1427.  
  1428. SAMPLE CIRCUITS
  1429.  
  1430. The following examples can be found in the \DC\DC sub-directory:
  1431.  
  1432. Filename                        Description
  1433. ───────────     ───────────────────────────────────────────────
  1434. ANALOGSW.DC     CMOS Analog Switch
  1435. CMOSAND.DC      CMOS 2-In AND
  1436. CMOSNAND.DC     CMOS 2-In NAND
  1437. CMOSNOR.DC      CMOS 2-In NOR
  1438. CMOSNOT.DC      CMOS Inverter (NOT)
  1439. CMOSOR.DC       CMOS 2-In OR
  1440. CMOSXOR.DC      CMOS Exclusive OR
  1441. DIODE1.DC       Sample Diode Circuits
  1442. DIODE2.DC       Plot of Diode Circuit
  1443. DIODEAND.DC     2-In Diode AND
  1444. DIODEAO.DC      Two 2-In Diode AND, and One 2-In Diode OR
  1445. DIODEOR.DC      2-In Diode OR
  1446. DLATCH.DC       Data Latch
  1447. DTLAND.DC       DTL 2-In AND
  1448. DTLNAND.DC      DTL 2-In NAND
  1449. DTLNOR.DC       DTL 2-In NOR
  1450. DTLNOT.DC       DTL Inverter (NOT)
  1451. DTLOR.DC        DTL 2-In OR
  1452. DTLXOR.DC       DTL Exclusive OR
  1453. DTOA.DC         Digital to Analog Converter
  1454. ECLNAND.DC      ECL 2-In AND/NAND
  1455. ECLNOT.DC       ECL Driver with Differential Output
  1456. ECLORNOR.DC     ECL 2-In OR/NOR
  1457. ECLXOR.DC       ECL Exclusive OR
  1458. FLIPFLOP.DC     Data Flip-Flop
  1459. FULLADDR.DC     Full Adder
  1460. HALFADDR.DC     Half Adder
  1461. LSNOT.DC        TTL Low-Power Schottky (LS) Inverter (NOT)
  1462. PLTCMOS.DC      Plot of CMOS Inverter (NOT)
  1463. PLTDTL.DC       Plot of DTL Inverter (NOT)
  1464. PLTECL.DC       Plot of ECL Driver with Differential Output
  1465. PLTTTL.DC       Plot of TTL Inverter (NOT)
  1466. RESIST1.DC      Sample Resistor Circuits
  1467. RESIST2.DC      Sample Potentiometer Circuit
  1468. RESIST3.DC      A very complex resistor network
  1469. SCHOTTKY.DC     NPN Schottky Transistor
  1470. SRLATCH.DC      Set-Reset Latch
  1471. SSPOWSW.DC      8 Amp Solid State Switch
  1472. SSRPOWSW.DC     8 Amp Reversible Solid State Switch
  1473. SSSW.DC         ½ Amp Solid State Switch
  1474. TRANDNPN.DC     NPN Darlington
  1475. TRANDPNP.DC     PNP Darlington
  1476. TRANNMOS.DC     NMOS Transistor
  1477. TRANNPN.DC      NPN Transistor
  1478. TRANPMOS.DC     PMOS Transistor
  1479. TRANPNP.DC      PNP Transistor
  1480. TTL3NOT.DC      TTL Three State Inverter
  1481. TTLAND.DC       TTL 2-In AND
  1482. TTLNAND.DC      TTL 2-In NAND
  1483. TTLNOR.DC       TTL 2-In NOR
  1484. TTLNOT.DC       TTL Inverter (NOT)
  1485. TTLOR.DC        TTL 2-In OR
  1486. TTLXOR.DC       TTL Exclusive OR
  1487.  
  1488. DC.DCL FILE FORMAT
  1489.  
  1490. DC.DCL contains the specifications for each library entry.  There is one line
  1491. for each entry as follows:
  1492.  
  1493. TYPE NL NC NP  --- Locations x y ---  --- Parameters ---
  1494.  
  1495. where TYPE is:
  1496.    INODE - Interconnection Node
  1497.    VNODE - Fixed Voltage Node
  1498.    SNODE - Switch Voltage Node
  1499.    R     - Resistor
  1500.    POT   - Potentiometer
  1501.    DIODE - DIODE
  1502.    PMOS  - P-channel CMOS transistor
  1503.    NMOS  - N-channel CMOS transistor
  1504.    NPN   - NPN bipolar transistor or darlington
  1505.    PNP   - PNP bipolar transistor or darlington
  1506.    IC    - Integrated Circuit - Stored in separate files
  1507.  
  1508. NL: Number of Locations
  1509. NC: Number of Connections must be less then or equal to NL
  1510. NP: Number of Parameters
  1511.  
  1512. --- Locations x y ---
  1513. Locations specified in x y pairs relative to upper left corner of icon.  The
  1514. first NC locations are the connections, any additional locations are for
  1515. Resistor current, Potentiometer % turns, or INODE Voltage labels.
  1516.  
  1517. --- Parameters --- 
  1518. The number and type of parameters depends on the TYPE as follows:
  1519.  
  1520. TYPE  NL NC NP           Locations                     Parameters        
  1521. ───── ── ── ──  ───────────────────────────   ───────────────────────────
  1522. INODE  2  1  0  connection, Voltage Label     none
  1523. VNODE  1  1  1  connection                    Fixed Voltage
  1524. SNODE  1  1  2  connection                    Up Voltage, Down Voltage 
  1525. R      3  2  2  First, Second, Amp Label      Resistance, Rated Wattage 
  1526. POT    4  3  2  Top, Bottom, Middle, % Label  Resistance, Rated Wattage 
  1527. DIODE  2  2  3  Plus, Negative                Vth, Amp, HiZ Resistance 
  1528. PMOS   4  4  4  Gate, Source, Base, Drain     Vth, Ohms/Volt², Amp, HiZ R
  1529. NMOS   4  4  4  Gate, Source, Base, Drain     Vth, Ohms/Volt², Amp, HiZ R
  1530. NPN    3  3  4  Emitter, Base, Collector      Vth, Hfe, Amp, HiZ R
  1531. PNP    3  3  4  Emitter, Base, Collector      Vth, Hfe, Amp, HiZ R
  1532. IC     ?  ? -1  +V, -V, Inputs, Outputs       dcl\filename.DCL
  1533.                 Up to Eight Connections
  1534.  
  1535. Integrated Circuits (ICs) files are stored in the \DC\DCL sub-directory.
  1536. ICs are all predefined DC Circuits that contain Components or other ICs.
  1537.  
  1538. DC AND DCL FILE FORMATS
  1539.  
  1540. Files with the extension "DC" are sample circuit files located in the DC sub-
  1541. directory.  Files with the extension "DCL" are library (IC) circuit files
  1542. located in the DCL sub-directory.  Both files contains circuit created by the
  1543. DC Circuit Analysis program, and have the same format:
  1544.  
  1545. The first line contains two numbers as follows:
  1546.  
  1547. NC NN
  1548.         where   NC = Number of Components or ICs
  1549.                 NN = Number of Nodes (Interconnect, Fixed, or Switch)
  1550.  
  1551. The next NC lines contains the components, one per line as follows:
  1552.  
  1553. LIB ROW COL N N1 N2 ...
  1554.         where   LIB = Library entry (0-111)
  1555.                 ROW = Screen row location of icon (0-299)
  1556.                 COL = Screen column location of icon (0-79)
  1557.                 N   = Number of connection terminals
  1558.                 N1, N2, ... = Node corresponding to each connection
  1559.                         Nodes are numbered starting with 100
  1560.  
  1561. The next NN lines contains the nodes, one per line as follows:
  1562.  
  1563. LIB ROW COL N  C1 CC1  C2 CC2 
  1564.         where   LIB = Library entry (0-111)
  1565.                 ROW = Screen row location of icon (0-299)
  1566.                 COL = Screen column location of icon (0-79)
  1567.                 N   = Number of connections
  1568.                 C1, C2, ... = Component (0-99), or Node
  1569.                 CC1, CC2, ... = Connection on component or Node C1, C2, ...
  1570.